{% load static %}
<div class="box_o " >
	<div class="rr_1">
	</div>
	<div class="rr_2">
	</div>
	<div class="rr_3">
	</div>
	<div class="rr">
		<h4> 条目列表 </h4>
		<div class="box_i " >
			<div class="fright">
				{%if status.Can_Edit %}
				<div id="external" dojoType="dijit.Dialog" title="SmallERP"
				href="{{current_url}}{{ id }}/add" style="overflow:auto; ">
				</div>
				{% if dojo %}
				<style type="text/css">		#external_underlay {
						background-color:grey;
					}</style>
				<button dojoType="dijit.form.Button" onClick="dijit.byId('external').show();"
				type="button">
					+增加条目
				</button>
				{% endif %}
				<a href="{{current_url}}{{ id }}/add" class="p" >+增加条目</a>
				&nbsp;&nbsp;
				{%endif%}
			</div>
			<img src="{% get_static_prefix %}stickies.ico"   width="16px" border="0">
			&nbsp;

			<hr>
			<table class="zebra-table">
				<tr class="even">
					<th>编号</th>
					<th>名称</th>
					<th>数量</th>
					<th>备注</th>
					<th>操作</th>
				</tr>
				{% for item in items %}
				<tr class="{% cycle 'odd' 'even' %}">
					<td>{{ item.id }}</td>
					<td>{{ item.Commodity }}</td>
					<td>{{ item.Quanlity }}</td>
					<td>{{ item.Description }}</td>
					<td>
					{%if status.Can_Edit %}
					<a class="p" href="{{current_url}}{{ id }}/{{ item.id }}/">修改</a>
					<a class="p" href="{{current_url}}{{ id }}/{{ item.id }}/del">删除</a>
					{%endif%}
					</td>
				</tr>
				{% endfor %}
			</table>
		</div>
		<H4>
		<a class="fright"   class="p">&nbsp;</a>&nbsp;&nbsp;
		</h4></H4>
	</div>
	<div class="rr_4">
	</div>
	<div class="rr_5">
	</div>
	<div class="rr_1">
	</div>
</div>